import { AmbientLight, DirectionalLight } from "three";
import Base from "./Base";

export default class Environment {
  private sunLight: DirectionalLight;
  private ambientLight: AmbientLight;
  constructor() {
    const base = Base.getInstance();
    this.sunLight = new DirectionalLight("#ffffff", 2);
    this.sunLight.castShadow = true;
    this.sunLight.shadow.camera.far = 20;
    this.sunLight.shadow.mapSize.set(2048, 2048);
    this.sunLight.shadow.normalBias = 0.05;

    this.sunLight.position.set(-1.5, 7, 10);
    base.scene.add(this.sunLight);

    this.ambientLight = new AmbientLight("#ffffff", 0.1);
    base.scene.add(this.ambientLight);
  }
}
